<?php

/**
 * ListCounters form.
 *
 * @package    erp-crm
 * @subpackage form
 * @author     Milwell H. Sia
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class ListCountersForm extends BaseListCountersForm
{
  public function configure()
  {
    if($this->isNew())
      $this->validatorSchema['iden'] = new sfValidatorString(array('required'=>true,));
    $this->widgetSchema['code']->setAttribute('size',5);
    $this->widgetSchema['name']->setAttribute('size',25);
    $this->widgetSchema['location']->setAttribute('size',25);
  }
  
  public function getUrl(){
    if($this->isNew())
      return 'counters/insert';
    else
      return 'counters/update';

  }
  
  public function getDeleteUrl(){
    return 'counters/delete?iden='.$this->getObject()->getIden();

  }
  
}
